package com.ktjy.dao.sysUser.impl;

import com.ktjy.dao.sysUser.SysUserMapper;
import com.ktjy.pojo.SysUser;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class SysUserMapperImpl implements SysUserMapper {
    private SqlSessionTemplate sqlSession;
    private SqlSessionFactoryBean sqlSessionFactory;
    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        //return sqlSession.selectList("com.ktjy.dao.sysUser.selectSysUserList", sysUser);
        return this.getSqlSession().selectList("com.ktjy.selectSysUserList", sysUser);
    }

    @Override
    public int add(SysUser sysUser) {
        return 0;
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }
    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public void setSqlSessionFactory(SqlSessionFactoryBean sqlSessionFactory) {
        this.sqlSessionFactory = sqlSessionFactory;
    }
}
